//  程序在运行过程中的共享域
//  Singleton.h
//  X-Touch2
//
//  Created by shengchao yang on 12-3-7.
//  Copyright (c) 2012年 foxhis. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AVFoundation/AVFoundation.h"
#import "AudioToolbox/AudioToolbox.h"
#import "Imports2.h"

@interface Singleton : NSObject<AVAudioPlayerDelegate>{
    NSInteger fullScreenType;          //大图模式显示数组的类别 0-commendPluPlus 1-orderingPluPlus 2-myOrderDishes 3-search
    NSString *hotelName;
    NSString *ipadUdid;
    NSString *downloadUrl;
    NSString *supportLangs;
    BOOL isUpdate;
    BOOL isOEMDisplay;
    
    NSString *language;
    NSDictionary *translate;            //图文翻译用字典
    BOOL isAnimating;                   //动画是否正在执行中
    BOOL isViewRemoveFromLeft;          //从左边退出
    BOOL isCommendView;                 //当前显示的是不是推荐菜界面
    UIPopoverController *popController;
}
+(Singleton *)sharedSingleton;
@property (nonatomic,retain) AVAudioPlayer *musicPlayer;

@property (nonatomic, assign) NSInteger fullScreenType;
@property (nonatomic, retain) NSString *hotelName;
@property (nonatomic, retain) NSString *ipadUdid;
@property (nonatomic, retain) NSString *downloadUrl;
@property (nonatomic, retain) NSString *supportLangs;
@property (nonatomic, retain) NSMutableArray * langsArray;

@property (nonatomic, assign) BOOL isAnimating;
@property (nonatomic, assign) BOOL isViewRemoveFromLeft;
@property (nonatomic, assign) BOOL isUpdate;
@property (nonatomic, assign) BOOL isOEMDisplay;
@property (nonatomic, assign) BOOL isCommendView;
@property (nonatomic, assign) BOOL isSortedByMenu;//是否按大类分
@property (nonatomic, assign) BOOL isPopOutFullScreen;//大图窗口是否已经弹出

@property (nonatomic, retain) NSString *language;
@property (nonatomic, retain) NSDictionary *translate;         // 图文翻译用字典
@property (nonatomic, retain) UIPopoverController *popController;
@property (nonatomic, retain) MyOrderMenus *currentOrderMenu;       //当前本地主单对象

@property (nonatomic, retain) NSMutableArray * pluBooks;
@property (nonatomic, assign) NSInteger bookIndex;             //菜本序号
@property (nonatomic, retain) NSString * currentPmCodes;       //当前大类代码('01','02','03')
@property (nonatomic, retain) NSMutableArray * pluMenus;
@property (nonatomic, assign) NSInteger menuIndex;             //大类序号
@property (nonatomic, retain) NSMutableArray * pluSorts;
@property (nonatomic, assign) NSInteger sortIndex;             //小类序号

@property (nonatomic, retain) NSMutableArray * searchPlus;     //实时查询过滤的菜品数组
@property (nonatomic, assign) NSInteger searchIndex;           //

@property (nonatomic, retain) NSMutableArray * commendPluPlus; //推荐菜数组
@property (nonatomic, assign) NSInteger commendIndex;          //推荐菜序号

@property (nonatomic, retain) NSMutableArray * orderingPluPlus;//当前点菜的菜品数组
@property (nonatomic, assign) NSInteger pluIndex;              //点菜的序号

@property (nonatomic, retain) NSMutableArray * myOrderMenus;   //本地主单数组
@property (nonatomic, assign) NSInteger myOrderMenuIndex;      //本地主单序号

@property (nonatomic, retain) NSMutableArray * myOrderDishes;  //当前本地主单下的明细(nine)
@property (nonatomic, retain) NSMutableArray * myOrderPluPkgs;  //当前本地主单下的套餐明细(table)
@property (nonatomic, assign) NSInteger myOrderPluIndex;       //我的点单序号(nine)
@property (nonatomic, retain) MyOrderDishes * currentMyOrderDish;//当前选中的菜品(table)
@property (nonatomic, retain) NSMutableArray * myOrderSortedType;      //我的点单里有多少类别
@property (nonatomic, retain) NSMutableDictionary * myOrderSortedDishes;//每个类别下面的明细数组

@property (nonatomic, retain) NSMutableArray * remoteMenus;    //已发送主单数组
@property (nonatomic, assign) NSInteger remoteMenuIndex;       //已发送主单序号
@property (nonatomic, retain) NSMutableArray * remoteSortedMenus;         //已发送的类别数组
@property (nonatomic, retain) NSMutableDictionary * remoteSortedDishes;   //已发送每个类别下的菜品明细

@property (nonatomic, retain) NSMutableArray * pluTables;
@property (nonatomic, retain) NSMutableArray * pluEmpnos;
@property (nonatomic, retain) NSMutableArray * pluSpecialSorts;
@property (nonatomic, assign) NSInteger specialSortIndex;
@property (nonatomic, retain) NSMutableArray * pluSpecialCodes;
@property (nonatomic, assign) NSInteger specialCodeIndex;

@property (nonatomic, retain) NSMutableArray * otherImages; //酒店简介图片数组
@property (nonatomic, assign) NSInteger otherImageIndex;//图片下标

//方法
- (void)playMusic:(NSString *) musicPath;
-(void) initPluTable;
-(void) initPluEmpno;
-(void) initSpecialSorts;
-(void) initSpecialCodes:(NSInteger)index;
-(void) initPluBook;
-(void) initMyOrderMenus:(NSString *)sql;
-(void) initSearchPlus:(NSString *)sql;
-(void) getCurrentOrderMenu:(NSString *)momLocalMenu;
-(void) initCurrentOrderMenu:(NSInteger)pbIndex;
-(void) initPluMenuByBookIndex:(NSInteger)pbIndex;
-(void) initPluMenuByBookCode:(NSString *)pbCode;
-(void) initPluSortByMenuIndex:(NSInteger)pmIndex;

-(void) initCommendPluPlus;
-(void) initPlusByMenuIndex:(NSInteger)pmIndex;
-(void) initPlusBySortIndex:(NSInteger)psIndex;
-(void) initMyOrderDishes;
-(void) initMyOrderPluPkgs:(NSString *)ppCode;
-(void) initMyOrderSortedDishes;
-(void) initRemoteMenus;
-(void) initRemoteDishes;

-(void) initOtherImages:(NSString *)imageType;
@end
